hvm: infrastructure for backwards-compatible loading
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Wed, 6 Apr 2011 10:40:51 +0000 (11:40 +0100)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Wed, 6 Apr 2011 10:40:51 +0000 (11:40 +0100)
commite5cc617a7090b35c001145f53c66194c9dd07075
tree4e67f724a0cb794c5e13f66475498fd03c742377
parentb44ab76605b8384b9b96ef7597b29b403daaca35
hvm: infrastructure for backwards-compatible loading

The hvm_save code is used to save and restore hypervisor-related
hvm state, either for classic save/restore, or for migration
(including remus).  This is meant to be backwards-compatible across
some hypervisor versions; but if it does change, there is no way to
handle the old format as well as the new.

This patch introduces the infrastructure to allow a single older
version ("compat") of any given "save type" to be defined, along with
a function to turn the "old" version into the "new" version.  If the
size check fails for the "normal" version, it will check the "compat"
version, and if it matches, will read the old entry and call the
conversion function.

This patch involves some preprocessor hackery, but I'm only extending the
hackery that's already there.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
Committed-by: Tim Deegan <Tim.Deegan@citrix.com>
xen/include/public/hvm/save.h
xen/include/xen/hvm/save.h